import request from '@/utils/request'

// 查询退库单列表
export function listBackbill(query) {
  return request({
    url: '/inv/backbill/list',
    method: 'get',
    params: query
  })
}

// 查询退库单详细
export function getBackbill(data) {
  return request({
    url: '/inv/backbill/getInfo',
    method: 'post',
    data: data
  })
}

// 新增退库单
export function addBackbill(data) {
  return request({
    url: '/inv/backbill/addBackbill',
    method: 'post',
    data: data
  })
}

// 修改退库单
export function updateBackbill(data) {
  return request({
    url: '/inv/backbill/updateBackbill',
    method: 'post',
    data: data
  })
}

// 删除退库单
export function delBackbill(id) {
  return request({
    url: '/inv/backbill/' + id,
    method: 'delete'
  })
}


export function getOutInvData(data) {
  return request({
    url: '/inv/backbill/getOutInvData',
    method: 'post',
    data: data
  })
}

export function delItem(data) {
  return request({
    url: '/inv/backbill/delItem',
    method: 'post',
    data: data
  })
}

export function checkInvQty(data) {
  return request({
    url: '/inv/backbill/checkInvQty',
    method: 'post',
    data: data
  })
}

export function executeBack(data) {
  return request({
    url: '/inv/backbill/executeBack',
    method: 'post',
    data: data
  })
}
